package jrain.fw.script.expression;

import java.util.Map;

import jrain.fw.script.resolver.VariableResolver;
import jrain.fw.script.tools.ELException;
import jrain.fw.script.tools.Logger;

public abstract class Literal extends Expression {
	// -------------------------------------
	// Properties
	// -------------------------------------
	// property value

	Object mValue;

	public Object getValue() {
		return mValue;
	}

	public void setValue(Object pValue) {
		mValue = pValue;
	}

	// -------------------------------------

	/**
	 * Constructor
	 */
	public Literal(Object pValue) {
		mValue = pValue;
	}

	// -------------------------------------
	// Expression methods
	// -------------------------------------

	/**
	 * Evaluates to the literal value
	 */
	public Object evaluate(Object pContext, VariableResolver pResolver, Map<Object, Object> functions, String defaultPrefix, Logger pLogger)
			throws ELException {
		return mValue;
	}

	// -------------------------------------
}
